<template>
	<view>
		<view class="goods_list">
			<scroll-view class="top_category" scroll-x="true">
				<!-- <view @click="leftClickHandle(index,item.id)" :class="active===index?'active':''" v-for="(item,index) in cates" :key="item.id">
					{{item.title}}
				</view> -->
				<view class="active">新品上架</view>
			</scroll-view>

			<goods-list :goods="goods"></goods-list>
		</view>
	</view>
</template>

<script>
	import goodsList from "../../components/goods-list.vue"
	export default {
		data() {
			return {
				goods:[]
			}
		},
		components: {
			"goods-list": goodsList
		},
		onLoad() {
			this.getGoodsList()
		},
		methods: {
			getGoodsList() {
				uni.request({
					url: "",
					// success: (res) => {
					// 	console.log(res.data)
					// 	if (res.data.data.status == 0) {
					// 		return uni.showToast({
					// 			title: "获取数据失败"
					// 		})
					// 	}
					// 	this.slideshows = res.data.data.slides
					// }
				})
			}
		}
	}
</script>

<style lang="scss">
.goods_list {
		background: #eee;

		.top_category {

			width: 100%;
			height: 70rpx;
			background: white;
			white-space: nowrap;

			view {
				width: 16%;
				line-height: 70rpx;
				font-size: 15px;
				text-align: center;
				padding: 0 15rpx;
				// border-right: 1rpx solid #eee;
				display: inline-block;
			}

			.active {
				border-bottom: 4rpx solid #FF6A6A;
				color: #FF6A6A;
			}
		}
	}
</style>
